/********************************************
* Copyrigt (C) rumi
* Module: drv_onewire.h
*********************************************/
#ifndef drv_onewire_H
#define drv_onewire_H
#include "mcu_config.h"
#include "drv_pincontrol.h"

typedef enum
{
    E_ONEWIRE_INIT = 0,
    E_ONEWIRE_TURN_HIGH_SPEED,
    E_ONEWIRE_GET_BYTE,
    E_ONEWIRE_SEND_BYTE,
}OneWire_Control_EnumDef;

typedef enum
{
    E_LOW_SPEED = 0,
    E_HIGH_SPEED = 1
}OneWire_Speed_EnumDef;

typedef struct
{
    PinConfig_DrvDef *OneWireIO;
    uint8_t CurrentSpeed;
    uint8_t TargetSpeed;
    uint16_t Delay;
}OneWire_Node;

uint8_t Drv_OneWire_Control(OneWire_Node *lDeivce,uint8_t type,uint8_t data);

#endif  // drv_onewire
/********************************************
 * End of file
*********************************************/